﻿@using Kugar.MVC.MobileUI.WeUI

@{
    Layout = null;
}

@inject MobileWeUI WeUI

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <title>@ViewBag.Title</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
    <link rel="stylesheet" href="@(MobileWeUI.LayoutPath.ResourceBaseUrl)/Content/css/MobileWeUI.css"/>

    @RenderSection("styles", false)
    
    @{
        var onRefreshCallback = (string) ViewBag.OnRefreshCallback;
        var onLoadMoreCallback = (string) ViewBag.OnLoadMoreCallback;
    }
</head>
<body ontouchstart class="@(string.IsNullOrWhiteSpace(onRefreshCallback)?"":"pullToRefreshCollection")" data-onpulltorefresh='@onRefreshCallback' data-loadmore="@(string.IsNullOrWhiteSpace(onLoadMoreCallback)?"False":"True")" data-loadmorecallback='@onLoadMoreCallback'>

    @RenderBody()



    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.js"></script>

    @if (WeUI.JsPluginStatus.Swiper)
    {
        <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/swiper.min.js"></script>
    }

    @if (WeUI.JsPluginStatus.CityPicker)
    {
        <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/city-picker.min.js"></script>
    }

    <script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
    <script src="@(MobileWeUI.LayoutPath.ResourceBaseUrl)/Content/js/common.js"></script>
    <script src="@(MobileWeUI.LayoutPath.ResourceBaseUrl)/Content/js/WeUIJS.js"></script>
    @RenderSection("scripts", false)

    <script>

        $(document).ready(function () {
            if (typeof wx !== "undefined") {
                wx.ready(function () {
                    WebUIJS.RefreshEvent($("html"));
                });
            } else {
                WebUIJS.RefreshEvent($("html"));
            }


        });
    </script>

    @WeUI.SystemComponent().ServerMsg().Render()
</body>
</html>